package com.neusoft.data.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.neusoft.data.mapper.SerServiceEvaluationMapper;
import com.neusoft.data.domain.SerServiceEvaluation;
import com.neusoft.data.service.ISerServiceEvaluationService;

/**
 * 服务评价Service业务层处理
 * 
 * @author slh
 * @date 2024-03-14
 */
@Service
public class SerServiceEvaluationServiceImpl implements ISerServiceEvaluationService 
{
    @Autowired
    private SerServiceEvaluationMapper serServiceEvaluationMapper;

    /**
     * 查询服务评价
     * 
     * @param serviceEvalId 服务评价主键
     * @return 服务评价
     */
    @Override
    public SerServiceEvaluation selectSerServiceEvaluationByServiceEvalId(Long serviceEvalId)
    {
        return serServiceEvaluationMapper.selectSerServiceEvaluationByServiceEvalId(serviceEvalId);
    }

    /**
     * 查询服务评价列表
     * 
     * @param serServiceEvaluation 服务评价
     * @return 服务评价
     */
    @Override
    public List<SerServiceEvaluation> selectSerServiceEvaluationList(SerServiceEvaluation serServiceEvaluation)
    {
        return serServiceEvaluationMapper.selectSerServiceEvaluationList(serServiceEvaluation);
    }

    /**
     * 新增服务评价
     * 
     * @param serServiceEvaluation 服务评价
     * @return 结果
     */
    @Override
    public int insertSerServiceEvaluation(SerServiceEvaluation serServiceEvaluation)
    {
        serServiceEvaluation.setCreateTime(DateUtils.getNowDate());
        return serServiceEvaluationMapper.insertSerServiceEvaluation(serServiceEvaluation);
    }

    /**
     * 修改服务评价
     * 
     * @param serServiceEvaluation 服务评价
     * @return 结果
     */
    @Override
    public int updateSerServiceEvaluation(SerServiceEvaluation serServiceEvaluation)
    {
        serServiceEvaluation.setUpdateTime(DateUtils.getNowDate());
        return serServiceEvaluationMapper.updateSerServiceEvaluation(serServiceEvaluation);
    }

    /**
     * 批量删除服务评价
     * 
     * @param serviceEvalIds 需要删除的服务评价主键
     * @return 结果
     */
    @Override
    public int deleteSerServiceEvaluationByServiceEvalIds(Long[] serviceEvalIds)
    {
        return serServiceEvaluationMapper.deleteSerServiceEvaluationByServiceEvalIds(serviceEvalIds);
    }

    /**
     * 删除服务评价信息
     * 
     * @param serviceEvalId 服务评价主键
     * @return 结果
     */
    @Override
    public int deleteSerServiceEvaluationByServiceEvalId(Long serviceEvalId)
    {
        return serServiceEvaluationMapper.deleteSerServiceEvaluationByServiceEvalId(serviceEvalId);
    }
}
